<template>
    <view class="pd pt40">
        <view class="row sderttr pt20 pm20" v-for="(sf,idx) in list" @tap="jjhssdf(sf)" :key="idx">
        	<!-- <view class="">
        		<image src="../../static/img/xuanhsd.png" class="kjjsee cz ab" v-if="sf.cls"></image>
        		<text class="kjjsee cz f_b" v-else></text>
        	</view> -->
        	<view class="ml30">
        		<image :src="sf.avatar" class="yj useertty cz"></image>
        	</view>
        	<view class="cf fz32 pl20">
        		{{sf.name}}
        	</view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
				list:[
						{
							cls:'',
							touxiang:'usericon.png',
							name:'汽车1群'
						},
						{
							cls:'',
							touxiang:'usericon.png',
							name:'汽车2群'
						},
						{
							cls:'',
							touxiang:'usericon.png',
							name:'汽车31111群'
						}
				    ],
					carid:""
			}
        },
        components: {},
		onLoad(options) {
			this.listd(options.carid)	
			this.carid=options.carid			
		},
        methods: {			
			jjhssdf(sf) {				
				if (sf.cls) {
					sf.cls = ''
				} else {
					sf.cls = "act"
				}				
				uni.navigateTo({
					url:"setPermission?id="+sf.id+'&carid='+this.carid
				})
			},
			async listd(id){
				let lists=await this.get('/api/car/'+id+'/unauthorized_list')
				console.log("群组列表",lists)
				this.list=lists.data
			}
		},
		// onNavigationBarButtonTap() {
		// 		uni.navigateTo({
		// 			url:"setPermission"
		// 		})
		// },
        mounted() {}
    }

</script>
<style  scoped>

</style>
